{% extends 'mainindex.html' %}

{% block css %}
    <link href="/static/maincss/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
{% endblock %}
{% block content %}


    <div class="wrapper wrapper-content animated fadeInRight">

        <!-- Panel Other -->
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>预约信息列表</h5>
                <div class="ibox-tools">

                </div>
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <!-- Example Events -->
                        <div class="example-wrap">
                                <table id="exampleTableEvents" data-height="400" data-mobile-responsive="true">
                                    <thead>
                                        <tr>
                                            <th data-field="state" data-checkbox="true"></th>
                                            <th data-field="id">ID</th>
                                            <th data-field="name">预约姓名</th>
                                            <th data-field="email">邮箱</th>
                                            <th data-field="phone">电话</th>
                                            <th data-field="booktime">预约时间</th>
                                            <th data-field="description">备注</th>
                                            <th data-field="subtime">提交时间</th>
                                            <th data-field="type">门票类型</th>
                                            <th data-field="uid">用户名</th>
                                            <th data-field="sceid">景点名</th>
                                            <th data-field="operate">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% for obj in queryset %}
                                        <tr>
                                            <td>{{ obj.id }}</td>
                                            <td>{{ obj.id }}</td>
                                            <td>{{ obj.bookname }}</td>
                                            <td>{{ obj.email }}</td>
                                            <td>{{ obj.phone }}</td>
                                            <td>{{ obj.booktime }}</td>
                                            <td>{{ obj.description }}</td>
                                            <td>{{ obj.subtime }}</td>
                                            <td>{{ obj.get_type_display }}</td>
                                            <td>{{ obj.uid.username }}</td>
                                            <td>{{ obj.sceid.sname }}</td>
                                            <td>
                                                <a class="btn btn-danger btn-xs" href="/mainbook/{{ obj.id }}/list/delete/">删除</a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!-- End Example Events -->
                        <div class="clearfix">
                            <ul class="pagination">
                                {{ page_string }}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Panel Other -->
    </div>
{% endblock %}

{% block js %}
    <script src="/static/mainjs/content.js?v=1.0.0"></script>
     <!-- Bootstrap table -->
    <script src="/static/mainjs/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/static/mainjs/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/static/mainjs/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

    <!-- Peity -->
    <script src="/static/mainjs/demo/bootstrap-table-demo.js"></script>

{% endblock %}






